# 7.1.1 编写清晰的程序
name = input("Please enter your name: ")
prompt = "If you tell us who you are, we can personalize the messages you see."
prompt += "\nWhat is your first name? "

name = input(prompt)
print("Hello, "+ name + "!")

# 7.1.2 使用int()来获取数值输入
age = input("How old are you?")
print(age)

# roolerrocaster.py
height = input("How tall are you , in inchers? ")
height = int(height)

if height >= 36:
    print("\nYou're tall enough to ride!")
else:
    print("\nYou'll be able to ride when you're a little older.")

# 7.1.3 求模运算符
print(4 % 3)

# even_or_odd.py
number = input("Enter a number, and I'll tell you if it's even or odd: ")
number = int(number)

if number %2 == 0:
    print("\nThe number " + str(number) + " is even.")
else:
    print("\nThe number " + str(number) + " is odd.")

# 实战
# 7-1 汽车租赁
car = input("你想要租怎样的一个汽车？")
print("\n让我看看你们的" + car + ".")

# 7-2 餐馆订位
eat = input("\n请问有多少个人用餐？ ")
eat = int(eat)

if eat > 8:
    print("\n不好意思，位置都被订满了.")
else:
    print("\n你好，这边还有空桌.")

# 7-3 10的整数倍
integer = input("\n请输入一个整数： ")
integer = int(integer)
if integer == 10*integer:
    print("这是10的整数倍")
else:
    print("这不是10的整数倍")